package fuxi;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;

public class demo7 {
    public static void main(String[] args) throws FileNotFoundException {
        //复习打印流
        //创建字节打印流
        PrintStream ps = new PrintStream(new FileOutputStream("printf.txt", true));
        ps.println("你好");
        ps.close();
        //创建字符打印流
        PrintWriter pw=new PrintWriter(new FileOutputStream("printf.txt",true));
        pw.print("你好");
       pw.println("小王");


        pw.close();

    }
}
